package com.inspinia.message.rpc.api;


import com.inspinia.base.service.BaseService;
import com.inspinia.message.common.model.NoticeAddressee;
import com.inspinia.message.common.model.NoticeAddresseeType;

import java.util.Collection;
import java.util.List;

/**
 * 通知收件人的服务层接口
 * Created by heshun on 2018-1-8.
 */
public interface NoticeAddresseeService extends BaseService<NoticeAddressee> {

    List<Long> batchInsert(Long noticeId, NoticeAddresseeType addresseeType, Collection<Long> addresseeIds);

    /**
     * 修改状态为已推送过
     *
     * @param ids
     * @return
     */
    int setPushed(List<Long> ids);

    /**
     * 查找未推送的接收人
     *
     * @param noticeId 通知id
     * @return
     */
    List<NoticeAddressee> findUnPushed(Long noticeId);

    void deleteDayBefore(int day);
}